<!DOCTYPE html>
<html class="um landscape min-width-240px min-width-320px min-width-480px min-width-768px min-width-1024px">
<head>
<title></title>
<meta charset="utf-8">
<meta name="viewport" content="target-densitydpi=device-dpi, width=device-width, initial-scale=1, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<meta name="copyright" content="http://www.appcms.org" />
<link rel="stylesheet" href="skin/base.css">
<link rel="stylesheet" href="skin/form.css">
<link rel="stylesheet" href="skin/btn.css">
<script src="js/zy_control.js"></script>
<script src="js/zy_click.js"></script>
<script src="js/config.js"></script>
<script src="js/common.js"></script>
</head>
<body ontouchstart>
<div id="main" class="box-ver box">
  <div id="header">
  	<div class="title">
  		<span class="l icon back" ontouchstart="zy_touch('act')" onclick="uexWindow.close(-1);"></span>
		<span class="txt">找回密码</span>
	</div>
  </div>
  
  
  <div id="content">
    <div  class="form">
	  <div class="items">
            <div class="item">
            	<div class="txt"><input type="text" name="email" id="email" maxlength="30"  placeholder="请输入注册时填写的邮箱" /></div>
            </div>
        </div>
      <div class="btn">
        <div class="button" onclick="forget();">找回密码</div>
      </div>
    </div>
  </div>
</div>
</body>
<script>
    	zy_init();
		function forget(){
			var email = $$('email').value;
			var patrn = /^([A-Za-z0-9])(\w)+@(\w)+(\.)(com|com\.cn|net|cn|net\.cn|org|biz|info|gov|gov\.cn|edu|edu\.cn)/;   
		    if(!patrn.exec(email)) {   
		        uexWindow.alert('错误提示', '请填写正确的Email~', '关闭');
				return false; 
		    }

			uexWindow.toast(1, 5, '提交中...', 0);
			var url = app_path + 'index.php?m=iapp&c=user&a=forget_password';
			uexXmlHttpMgr.open(1, 'post', url, "8000");
			uexXmlHttpMgr.setPostData(1, '0', 'email', email);
			uexXmlHttpMgr.send(1);
		}
		
		window.uexOnload = function(type){
			if (!type) {
				uexXmlHttpMgr.onData = function(opId, status, data){
					uexXmlHttpMgr.close(opId);
					uexWindow.closeToast();
					if (status == 1) {
						data = JSON.parse(data);
						if(opId == 1) {
							if (data['success'] == 'OK') {
								uexWindow.toast("0","5",data['msg'],2000);
							}else {
								uexWindow.toast("0","5",data['msg'],2000);
							}
						}
					}else if(status==-1){						
						uexWindow.toast("0","5","提交超时~",1000);
					}
				}
			}
		}
    </script>
</html>